using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class SO_DiagnosisCategMap : EntityTypeConfiguration<SO_DiagnosisCateg>
    {
        public SO_DiagnosisCategMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.ID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.CATEGORY)
                .HasMaxLength(200);

            this.Property(t => t.TYPE)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("SO_DiagnosisCateg");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.CATEGORY).HasColumnName("CATEGORY");
            this.Property(t => t.TYPE).HasColumnName("TYPE");
        }
    }
}
